
_interrupt:
	MOVWF      R15+0
	SWAPF      STATUS+0, 0
	CLRF       STATUS+0
	MOVWF      ___saveSTATUS+0
	MOVF       PCLATH+0, 0
	MOVWF      ___savePCLATH+0
	CLRF       PCLATH+0

;SmartDigitalClock.c,669 :: 		void interrupt(void){
;SmartDigitalClock.c,671 :: 		if(TMR0IF_bit){
	BTFSS      TMR0IF_bit+0, BitPos(TMR0IF_bit+0)
	GOTO       L_interrupt0
;SmartDigitalClock.c,673 :: 		Tmr0_Cnt++;
	INCF       _Tmr0_Cnt+0, 1
;SmartDigitalClock.c,674 :: 		if(Tmr0_Cnt  == 7){        // Flashed RC0_pin after 500ms
	MOVF       _Tmr0_Cnt+0, 0
	XORLW      7
	BTFSS      STATUS+0, 2
	GOTO       L_interrupt1
;SmartDigitalClock.c,675 :: 		RC0_bit =~RC0_bit;
	MOVLW
	XORWF      RC0_bit+0, 1
;SmartDigitalClock.c,676 :: 		Tmr0_Cnt = 0;
	CLRF       _Tmr0_Cnt+0
;SmartDigitalClock.c,677 :: 		EndOfTimingWindows = 1;
	BSF        _EndOfTimingWindows+0, BitPos(_EndOfTimingWindows+0)
;SmartDigitalClock.c,678 :: 		}
L_interrupt1:
;SmartDigitalClock.c,680 :: 		TMR0 = 0x00;
	CLRF       TMR0+0
;SmartDigitalClock.c,681 :: 		TMR0IF_bit = 0;
	BCF        TMR0IF_bit+0, BitPos(TMR0IF_bit+0)
;SmartDigitalClock.c,682 :: 		}
L_interrupt0:
;SmartDigitalClock.c,683 :: 		if( PIR1.TMR1IF){           // Select Timer0 overload Interrupt
	BTFSS      PIR1+0, 0
	GOTO       L_interrupt2
;SmartDigitalClock.c,685 :: 		Tmr1_Cnt++;
	INCF       _Tmr1_Cnt+0, 1
;SmartDigitalClock.c,686 :: 		RC3_bit=~ RC3_bit;
	MOVLW
	XORWF      RC3_bit+0, 1
;SmartDigitalClock.c,687 :: 		TMR1H = 0x00;
	CLRF       TMR1H+0
;SmartDigitalClock.c,688 :: 		TMR1L = 0x00;
	CLRF       TMR1L+0
;SmartDigitalClock.c,689 :: 		PIR1.TMR1IF = 0;
	BCF        PIR1+0, 0
;SmartDigitalClock.c,690 :: 		}
L_interrupt2:
;SmartDigitalClock.c,691 :: 		if(INTF_bit){
	BTFSS      INTF_bit+0, BitPos(INTF_bit+0)
	GOTO       L_interrupt3
;SmartDigitalClock.c,692 :: 		if(State == RFRemoteDecode_Detect_Sync_Bit){
	MOVF       _State+0, 0
	XORLW      0
	BTFSS      STATUS+0, 2
	GOTO       L_interrupt4
;SmartDigitalClock.c,693 :: 		if(RB0_bit == 0){                         //Falling Event Interrupt
	BTFSC      RB0_bit+0, BitPos(RB0_bit+0)
	GOTO       L_interrupt5
;SmartDigitalClock.c,698 :: 		HighTickCounter = (unsigned int )(TMR1L | (TMR1H << 8));
	MOVF       TMR1H+0, 0
	MOVWF      R0+1
	CLRF       R0+0
	MOVF       R0+0, 0
	IORWF      TMR1L+0, 0
	MOVWF      R2+0
	MOVLW      0
	IORWF      R0+1, 0
	MOVWF      R2+1
	MOVF       R2+0, 0
	MOVWF      _HighTickCounter+0
	MOVF       R2+1, 0
	MOVWF      _HighTickCounter+1
;SmartDigitalClock.c,699 :: 		TMR1L = 0;
	CLRF       TMR1L+0
;SmartDigitalClock.c,700 :: 		TMR1H = 0;
	CLRF       TMR1H+0
;SmartDigitalClock.c,703 :: 		if( (HighTickCounter > 0 )&&(HighTickCounter < 2048) &&(Tmr1_Cnt==0)/*&& (HighTickCounter!=0)*/){
	MOVF       R2+1, 0
	SUBLW      0
	BTFSS      STATUS+0, 2
	GOTO       L__interrupt28
	MOVF       R2+0, 0
	SUBLW      0
L__interrupt28:
	BTFSC      STATUS+0, 0
	GOTO       L_interrupt8
	MOVLW      8
	SUBWF      _HighTickCounter+1, 0
	BTFSS      STATUS+0, 2
	GOTO       L__interrupt29
	MOVLW      0
	SUBWF      _HighTickCounter+0, 0
L__interrupt29:
	BTFSC      STATUS+0, 0
	GOTO       L_interrupt8
	MOVF       _Tmr1_Cnt+0, 0
	XORLW      0
	BTFSS      STATUS+0, 2
	GOTO       L_interrupt8
L__interrupt24:
;SmartDigitalClock.c,708 :: 		Detect1aPulseFlag =1 ;
	BSF        _Detect1aPulseFlag+0, BitPos(_Detect1aPulseFlag+0)
;SmartDigitalClock.c,709 :: 		}
	GOTO       L_interrupt9
L_interrupt8:
;SmartDigitalClock.c,711 :: 		Detect1aPulseFlag = 0;
	BCF        _Detect1aPulseFlag+0, BitPos(_Detect1aPulseFlag+0)
;SmartDigitalClock.c,712 :: 		Tmr1_Cnt =0;
	CLRF       _Tmr1_Cnt+0
;SmartDigitalClock.c,714 :: 		}
L_interrupt9:
;SmartDigitalClock.c,715 :: 		INTEDG_bit = 1;                           // Set rising trigged
	BSF        INTEDG_bit+0, BitPos(INTEDG_bit+0)
;SmartDigitalClock.c,716 :: 		}
	GOTO       L_interrupt10
L_interrupt5:
;SmartDigitalClock.c,723 :: 		LowTickCounter = (TMR1L | (TMR1H << 8)) ;          //Get value of timer0 register
	MOVF       TMR1H+0, 0
	MOVWF      R0+1
	CLRF       R0+0
	MOVF       R0+0, 0
	IORWF      TMR1L+0, 0
	MOVWF      R6+0
	MOVLW      0
	IORWF      R0+1, 0
	MOVWF      R6+1
	MOVF       R6+0, 0
	MOVWF      _LowTickCounter+0
	MOVF       R6+1, 0
	MOVWF      _LowTickCounter+1
;SmartDigitalClock.c,724 :: 		TMR1L = 0;
	CLRF       TMR1L+0
;SmartDigitalClock.c,725 :: 		TMR1H = 0;
	CLRF       TMR1H+0
;SmartDigitalClock.c,727 :: 		if((LowTickCounter >= ((HighTickCounter << 5)-(HighTickCounter << 2)/*- HighTickCounter*/)) &&
	MOVLW      5
	MOVWF      R0+0
	MOVF       _HighTickCounter+0, 0
	MOVWF      R4+0
	MOVF       _HighTickCounter+1, 0
	MOVWF      R4+1
	MOVF       R0+0, 0
L__interrupt30:
	BTFSC      STATUS+0, 2
	GOTO       L__interrupt31
	RLF        R4+0, 1
	RLF        R4+1, 1
	BCF        R4+0, 0
	ADDLW      255
	GOTO       L__interrupt30
L__interrupt31:
	MOVF       _HighTickCounter+0, 0
	MOVWF      R0+0
	MOVF       _HighTickCounter+1, 0
	MOVWF      R0+1
	RLF        R0+0, 1
	RLF        R0+1, 1
	BCF        R0+0, 0
	RLF        R0+0, 1
	RLF        R0+1, 1
	BCF        R0+0, 0
	MOVF       R0+0, 0
	SUBWF      R4+0, 0
	MOVWF      R2+0
	MOVF       R0+1, 0
	BTFSS      STATUS+0, 0
	ADDLW      1
	SUBWF      R4+1, 0
	MOVWF      R2+1
;SmartDigitalClock.c,728 :: 		(LowTickCounter <=  (HighTickCounter << 5)+ (HighTickCounter << 3))                  &&
	MOVF       R2+1, 0
	SUBWF      R6+1, 0
	BTFSS      STATUS+0, 2
	GOTO       L__interrupt32
	MOVF       R2+0, 0
	SUBWF      R6+0, 0
L__interrupt32:
	BTFSS      STATUS+0, 0
	GOTO       L_interrupt13
	MOVLW      5
	MOVWF      R0+0
	MOVF       _HighTickCounter+0, 0
	MOVWF      R4+0
	MOVF       _HighTickCounter+1, 0
	MOVWF      R4+1
	MOVF       R0+0, 0
L__interrupt33:
	BTFSC      STATUS+0, 2
	GOTO       L__interrupt34
	RLF        R4+0, 1
	RLF        R4+1, 1
	BCF        R4+0, 0
	ADDLW      255
	GOTO       L__interrupt33
L__interrupt34:
	MOVF       _HighTickCounter+0, 0
	MOVWF      R0+0
	MOVF       _HighTickCounter+1, 0
	MOVWF      R0+1
	RLF        R0+0, 1
	RLF        R0+1, 1
	BCF        R0+0, 0
	RLF        R0+0, 1
	RLF        R0+1, 1
	BCF        R0+0, 0
	RLF        R0+0, 1
	RLF        R0+1, 1
	BCF        R0+0, 0
	MOVF       R0+0, 0
	ADDWF      R4+0, 0
	MOVWF      R2+0
	MOVF       R4+1, 0
	BTFSC      STATUS+0, 0
	ADDLW      1
	ADDWF      R0+1, 0
	MOVWF      R2+1
	MOVF       _LowTickCounter+1, 0
	SUBWF      R2+1, 0
	BTFSS      STATUS+0, 2
	GOTO       L__interrupt35
	MOVF       _LowTickCounter+0, 0
	SUBWF      R2+0, 0
L__interrupt35:
	BTFSS      STATUS+0, 0
	GOTO       L_interrupt13
;SmartDigitalClock.c,729 :: 		(Detect1aPulseFlag) && (Tmr1_Cnt ==0) && (LowTickCounter!=0)){
	BTFSS      _Detect1aPulseFlag+0, BitPos(_Detect1aPulseFlag+0)
	GOTO       L_interrupt13
	MOVF       _Tmr1_Cnt+0, 0
	XORLW      0
	BTFSS      STATUS+0, 2
	GOTO       L_interrupt13
	MOVLW      0
	XORWF      _LowTickCounter+1, 0
	BTFSS      STATUS+0, 2
	GOTO       L__interrupt36
	MOVLW      0
	XORWF      _LowTickCounter+0, 0
L__interrupt36:
	BTFSC      STATUS+0, 2
	GOTO       L_interrupt13
L__interrupt23:
;SmartDigitalClock.c,734 :: 		DetectSyncBit = 1;
	BSF        _DetectSyncBit+0, BitPos(_DetectSyncBit+0)
;SmartDigitalClock.c,735 :: 		SyncBitCouter++;
	INCF       _SyncBitCouter+0, 1
;SmartDigitalClock.c,736 :: 		RC2_bit = ~ RC2_bit;
	MOVLW
	XORWF      RC2_bit+0, 1
;SmartDigitalClock.c,737 :: 		}
	GOTO       L_interrupt14
L_interrupt13:
;SmartDigitalClock.c,739 :: 		LowTickCounter = 0;
	CLRF       _LowTickCounter+0
	CLRF       _LowTickCounter+1
;SmartDigitalClock.c,740 :: 		HighTickCounter = 0;
	CLRF       _HighTickCounter+0
	CLRF       _HighTickCounter+1
;SmartDigitalClock.c,742 :: 		}
L_interrupt14:
;SmartDigitalClock.c,744 :: 		Detect1aPulseFlag = 0;             // Trap Cumulative Error
	BCF        _Detect1aPulseFlag+0, BitPos(_Detect1aPulseFlag+0)
;SmartDigitalClock.c,745 :: 		Tmr1_Cnt = 0;             //Clear for starting new sension
	CLRF       _Tmr1_Cnt+0
;SmartDigitalClock.c,746 :: 		INTEDG_bit = 0;                          // Set Falling Trigged
	BCF        INTEDG_bit+0, BitPos(INTEDG_bit+0)
;SmartDigitalClock.c,747 :: 		}
L_interrupt10:
;SmartDigitalClock.c,748 :: 		}
L_interrupt4:
;SmartDigitalClock.c,749 :: 		INTF_bit = 0;
	BCF        INTF_bit+0, BitPos(INTF_bit+0)
;SmartDigitalClock.c,750 :: 		}
L_interrupt3:
;SmartDigitalClock.c,751 :: 		}
L_end_interrupt:
L__interrupt27:
	MOVF       ___savePCLATH+0, 0
	MOVWF      PCLATH+0
	SWAPF      ___saveSTATUS+0, 0
	MOVWF      STATUS+0
	SWAPF      R15+0, 1
	SWAPF      R15+0, 0
	RETFIE
; end of _interrupt

_main:

;SmartDigitalClock.c,755 :: 		void main(void){
;SmartDigitalClock.c,757 :: 		UART1_Init(19200);
	MOVLW      12
	MOVWF      SPBRG+0
	BSF        TXSTA+0, 2
	CALL       _UART1_Init+0
;SmartDigitalClock.c,758 :: 		Delay_ms(100);                  // Wait for UART module to stabilize
	MOVLW      130
	MOVWF      R12+0
	MOVLW      221
	MOVWF      R13+0
L_main15:
	DECFSZ     R13+0, 1
	GOTO       L_main15
	DECFSZ     R12+0, 1
	GOTO       L_main15
	NOP
	NOP
;SmartDigitalClock.c,759 :: 		UART1_Write_Text("Start");
	MOVLW      ?lstr1_SmartDigitalClock+0
	MOVWF      FARG_UART1_Write_Text_uart_text+0
	CALL       _UART1_Write_Text+0
;SmartDigitalClock.c,761 :: 		Tmr1_Cnt          = 0;
	CLRF       _Tmr1_Cnt+0
;SmartDigitalClock.c,762 :: 		Tmr0_Cnt          = 0;
	CLRF       _Tmr0_Cnt+0
;SmartDigitalClock.c,763 :: 		HighTickCounter   = 0;                         // High level of Signal
	CLRF       _HighTickCounter+0
	CLRF       _HighTickCounter+1
;SmartDigitalClock.c,764 :: 		LowTickCounter    = 0;                           //Low level of Signal
	CLRF       _LowTickCounter+0
	CLRF       _LowTickCounter+1
;SmartDigitalClock.c,765 :: 		CntFrame          = 0;                             // Count Good Frame
	CLRF       _CntFrame+0
;SmartDigitalClock.c,766 :: 		SyncBitCouter     = 0;
	CLRF       _SyncBitCouter+0
;SmartDigitalClock.c,767 :: 		State             = RFRemoteDecode_Detect_Sync_Bit;
	CLRF       _State+0
;SmartDigitalClock.c,770 :: 		Detect31aPulseFlag  = 0 ;
	BCF        _Detect31aPulseFlag+0, BitPos(_Detect31aPulseFlag+0)
;SmartDigitalClock.c,771 :: 		Detect1aPulseFlag   = 0 ;
	BCF        _Detect1aPulseFlag+0, BitPos(_Detect1aPulseFlag+0)
;SmartDigitalClock.c,772 :: 		DetectSyncBit       = 0 ;
	BCF        _DetectSyncBit+0, BitPos(_DetectSyncBit+0)
;SmartDigitalClock.c,773 :: 		EndOfTimingWindows  = 0 ;
	BCF        _EndOfTimingWindows+0, BitPos(_EndOfTimingWindows+0)
;SmartDigitalClock.c,778 :: 		TRISC = 0b00000000;
	CLRF       TRISC+0
;SmartDigitalClock.c,779 :: 		PORTC = 0x00;
	CLRF       PORTC+0
;SmartDigitalClock.c,820 :: 		TRISB      =0x00000001; // RB0 's Digital input
	MOVLW      1
	MOVWF      TRISB+0
;SmartDigitalClock.c,821 :: 		OPTION_REG =0b01000000 ;
	MOVLW      64
	MOVWF      OPTION_REG+0
;SmartDigitalClock.c,824 :: 		INTE_bit = 0;           // Disable external interrupt on RB0
	BCF        INTE_bit+0, BitPos(INTE_bit+0)
;SmartDigitalClock.c,825 :: 		INTF_bit = 0;           // Clear Flag external interrupt
	BCF        INTF_bit+0, BitPos(INTF_bit+0)
;SmartDigitalClock.c,872 :: 		PS2_bit = 1;
	BSF        PS2_bit+0, BitPos(PS2_bit+0)
;SmartDigitalClock.c,873 :: 		PS1_bit = 1;
	BSF        PS1_bit+0, BitPos(PS1_bit+0)
;SmartDigitalClock.c,874 :: 		PS0_bit = 1;
	BSF        PS0_bit+0, BitPos(PS0_bit+0)
;SmartDigitalClock.c,875 :: 		TMR0    = 0x00;
	CLRF       TMR0+0
;SmartDigitalClock.c,876 :: 		TMR0IE_bit = 0;
	BCF        TMR0IE_bit+0, BitPos(TMR0IE_bit+0)
;SmartDigitalClock.c,877 :: 		TMR0IF_bit = 0;
	BCF        TMR0IF_bit+0, BitPos(TMR0IF_bit+0)
;SmartDigitalClock.c,881 :: 		INTCON = 0b11000000;         //Enable Global interrupt(GIE) and Peripheral Interrupt (PIE)
	MOVLW      192
	MOVWF      INTCON+0
;SmartDigitalClock.c,882 :: 		T1CON   = 1;                 // Enable Timer1-16 bit
	MOVLW      1
	MOVWF      T1CON+0
;SmartDigitalClock.c,883 :: 		PIR1.TMR1IF = 0;             // Clear Timer1 interrupt flag
	BCF        PIR1+0, 0
;SmartDigitalClock.c,884 :: 		PIE1.TMR1IE = 1;             // Enable Timer1 interrupt
	BSF        PIE1+0, 0
;SmartDigitalClock.c,885 :: 		T1CKPS0_bit = 0;             // Select prescaler for Timer1 is 1:8
	BCF        T1CKPS0_bit+0, BitPos(T1CKPS0_bit+0)
;SmartDigitalClock.c,886 :: 		T1CkPS1_bit = 0;
	BCF        T1CKPS1_bit+0, BitPos(T1CKPS1_bit+0)
;SmartDigitalClock.c,888 :: 		TMR1H       =0x00;
	CLRF       TMR1H+0
;SmartDigitalClock.c,889 :: 		TMR1L       =0x00;
	CLRF       TMR1L+0
;SmartDigitalClock.c,896 :: 		TMR0IE_bit = 1;
	BSF        TMR0IE_bit+0, BitPos(TMR0IE_bit+0)
;SmartDigitalClock.c,897 :: 		INTE_bit = 1; // Enable External Interrupt
	BSF        INTE_bit+0, BitPos(INTE_bit+0)
;SmartDigitalClock.c,898 :: 		INTEDG_bit = 1;// Falling
	BSF        INTEDG_bit+0, BitPos(INTEDG_bit+0)
;SmartDigitalClock.c,900 :: 		while(1){
L_main16:
;SmartDigitalClock.c,902 :: 		if(DetectSyncBit){              // Get HighTickCouter Exactly
	BTFSS      _DetectSyncBit+0, BitPos(_DetectSyncBit+0)
	GOTO       L_main18
;SmartDigitalClock.c,903 :: 		if((EndOfTimingWindows) /*&&(SyncBitCouter >= 10)*/ ){
	BTFSS      _EndOfTimingWindows+0, BitPos(_EndOfTimingWindows+0)
	GOTO       L_main19
;SmartDigitalClock.c,909 :: 		if((SyncBitCouter >= 5) && (HighTickCounter > 0) &&(HighTickCounter < 2048) ){
	MOVLW      5
	SUBWF      _SyncBitCouter+0, 0
	BTFSS      STATUS+0, 0
	GOTO       L_main22
	MOVF       _HighTickCounter+1, 0
	SUBLW      0
	BTFSS      STATUS+0, 2
	GOTO       L__main38
	MOVF       _HighTickCounter+0, 0
	SUBLW      0
L__main38:
	BTFSC      STATUS+0, 0
	GOTO       L_main22
	MOVLW      8
	SUBWF      _HighTickCounter+1, 0
	BTFSS      STATUS+0, 2
	GOTO       L__main39
	MOVLW      0
	SUBWF      _HighTickCounter+0, 0
L__main39:
	BTFSC      STATUS+0, 0
	GOTO       L_main22
L__main25:
;SmartDigitalClock.c,910 :: 		RC1_bit = ~RC1_bit;
	MOVLW
	XORWF      RC1_bit+0, 1
;SmartDigitalClock.c,913 :: 		WordToStr(HighTickCounter, txt1);
	MOVF       _HighTickCounter+0, 0
	MOVWF      FARG_WordToStr_input+0
	MOVF       _HighTickCounter+1, 0
	MOVWF      FARG_WordToStr_input+1
	MOVLW      _txt1+0
	MOVWF      FARG_WordToStr_output+0
	CALL       _WordToStr+0
;SmartDigitalClock.c,918 :: 		UART1_Write_Text("HighTickCouter:");
	MOVLW      ?lstr2_SmartDigitalClock+0
	MOVWF      FARG_UART1_Write_Text_uart_text+0
	CALL       _UART1_Write_Text+0
;SmartDigitalClock.c,919 :: 		UART1_Write_Text(txt1);
	MOVLW      _txt1+0
	MOVWF      FARG_UART1_Write_Text_uart_text+0
	CALL       _UART1_Write_Text+0
;SmartDigitalClock.c,920 :: 		UART1_Write_Text("\r\n");
	MOVLW      ?lstr3_SmartDigitalClock+0
	MOVWF      FARG_UART1_Write_Text_uart_text+0
	CALL       _UART1_Write_Text+0
;SmartDigitalClock.c,924 :: 		}
L_main22:
;SmartDigitalClock.c,927 :: 		SyncBitCouter = 0;
	CLRF       _SyncBitCouter+0
;SmartDigitalClock.c,928 :: 		EndOfTimingWindows = 0;
	BCF        _EndOfTimingWindows+0, BitPos(_EndOfTimingWindows+0)
;SmartDigitalClock.c,930 :: 		}
L_main19:
;SmartDigitalClock.c,931 :: 		DetectSyncBit = 0;
	BCF        _DetectSyncBit+0, BitPos(_DetectSyncBit+0)
;SmartDigitalClock.c,932 :: 		}
L_main18:
;SmartDigitalClock.c,934 :: 		}
	GOTO       L_main16
;SmartDigitalClock.c,935 :: 		}
L_end_main:
	GOTO       $+0
; end of _main
